package shapes;

public class VerticalLine extends Line {

    public VerticalLine(int length) {

        super(length);
        data = new char[length][1];
    }

    @Override
    public void create() {
        for (int i = 0; i < length; i++) {
            data[i][0] = '*';
        }
    }

    @Override
    public String dataToString() {
        StringBuilder outputString = new StringBuilder(2*length);
        for (int i = 0; i < length; i++){
            outputString.append(data[i][0] + "\n");
        }
        return outputString.toString();
    }
}
